package com.piggy.logi.sys.mapper;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.piggy.common.core.web.page.BaseMapperPlus;
import com.piggy.logi.sys.domain.LogiWaybillGoodSource;

import java.util.List;

public interface LogiWaybillGoodSourceMapper extends BaseMapperPlus<LogiWaybillGoodSource> {

    default List<LogiWaybillGoodSource> selectByWaybillIds(List<Long> waybillIds) {
        return selectList(Wrappers.<LogiWaybillGoodSource>lambdaQuery().in(LogiWaybillGoodSource::getWaybillId, waybillIds));
    }

    default void removeByWaybillId(Long waybillId) {
        delete(Wrappers.<LogiWaybillGoodSource>lambdaQuery().eq(LogiWaybillGoodSource::getWaybillId, waybillId));
    }
}
